#include <string>
#include <iostream>
#include "../tinyxml2-master/tinyxml2.h"
#include "../tinyxml2-master/tinyxml2.cpp"

using namespace std;
using namespace tinyxml2;

int main(){
    tinyxml2::XMLDocument doc;
    doc.LoadFile( "../ppt/455/ppt/slides/slide1.xml");
    XMLPrinter printer;
    doc.Print( &printer );//将Print打印到Xmlprint类中 即保存在内存中
    string buf;
    buf = printer.CStr();//转换成const char*类型
    cout << buf << endl;//buf即为创建后的XML 字符串。
}